module.exports = {
  scope: 'slave',
  input: 'src',
  output: '',
  exclude: ['**/node_modules/**/*', '**/locales/**/*', '**/i18n/**/*'],
  languages: [
    { name: 'zh_CN', title: '简体中文(中国)', default: true, active: true },
    { name: 'en_US', title: '英语(美国)' },
  ],
  defaultLanguage: 'zh_CN',
  activeLanguage: 'zh_CN',
  rules: {
    js: {
      caller: '',
      functionName: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
    },
    ts: {
      caller: '',
      functionName: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
    },
    cjs: {
      caller: '',
      functionName: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
    },
    mjs: {
      caller: '',
      functionName: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
    },
    jsx: {
      caller: '',
      functionName: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
      functionSnippets: '',
    },
    tsx: {
      caller: '',
      functionName: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
      functionSnippets: '',
    },
    vue: {
      caller: 'this',
      functionNameInTemplate: '$t',
      functionNameInScript: '$t',
      customizeKey: function getCustomizeKey(key, path) {
        return key
      },
      forceImport: false,
      importDeclaration: 'import { t } from "@/i18n"',
      tagOrder: ['template', 'script', 'style'],
    },
  },
  incremental: true,
  skipExtract: false,
  localePath: './src/i18n/locales/zh_CN.js',
  localeFileType: 'js',
  excelPath: './src/i18n/locales.xlsx',
  exportExcel: false,
  locales: ['zh_CN'],
  globalRule: { ignoreMethods: [] },
  adjustKeyMap: function (allKeyValue, currentFileKeyMap, currentFilePath) {
    return allKeyValue
  },
  namespaces: {
    application: { id: 'winning-dps-dv-chongqing-web', name: 'DF-数据平台前端' },
    project: {
      id: 'winning-dps-dv-chongqing-web',
      name: 'DF-新桥指标管理平台',
    },
  },
}
